********************************************************************************
********************************************************************************
* Title:		master
* Project:		Stress, Ethnicity, and Prosocial Behavior
* Author:		Moritz Poll (moritz.poll@brown.edu)
* PIs:			Johannes Haushofer, Sara Lowes, Abednego Musau, David Ndetei, 
*				Nathan Nunn, Moritz Poll, Nancy Qian
* Purpose:		Master do file
********************************************************************************
********************************************************************************

********************************************************************************
********************************************************************************
******************** Control Panel (Flags: 0 = No; 1 = Yes) ********************
********************************************************************************
********************************************************************************

/* Analysis */		global regs_flag					= 1
					global randomization_inference_flag	= 1
/* Tables */		global regression_tables_flag		= 1
					global balance_table_flag			= 1
					global mht_table_flag				= 1
/* Figures */		global mean_comparison_flag			= 1
					global summarystats_flag			= 1
					global specification_chart_flag		= 1
					global comprehension_figure_flag	= 1
					global cortisol_flag				= 1
					global time_flag					= 1

/* Quick reference to data sets
use  "$cleandata_dir/HIO_for_analysis_session.dta", clear 
use  "$cleandata_dir/HIO_for_analysis_wide.dta", clear 
use  "$cleandata_dir/HIO_for_analysis_xlong.dta", clear
*/
********************************************************************************
*********************************** Preamble ***********************************
********************************************************************************

if c(username) == "Moritz" local path "Box Sync/_Busara Lab/Lab Project Folders By Years/Lab Project Folder_2018/20044_Hydro_Ingroup_Outgroup"
else dis as error "Define local path."
global root_dir "/Users/`c(username)'/`path'/ReplicationFiles"
include "$root_dir/Analysis/dofiles/preamble.do"

********************************************************************************
********************************************************************************
********************************** Analysis ************************************
********************************************************************************
********************************************************************************
********************************* Regressions **********************************
if $regs_flag == 1 include "$do_analysis_dir/regressions.do"
if $randomization_inference_flag == 1 include "$do_analysis_dir/randomization_inference.do"
******************************* Regression Tables ******************************
if $regression_tables_flag == 1 include "$do_analysis_dir/tables.do"
*********************************** Balance ************************************
if $balance_table_flag == 1 include "$do_analysis_dir/balance.do"
************************* Multiple-Hypothesis Testing **************************
if $mht_table_flag == 1 include "$do_analysis_dir/mht.do"

********************************************************************************
********************************************************************************
*********************************** Figures ************************************
********************************************************************************
********************************************************************************
****************************** Mean Comparisons ********************************
if $mean_comparison_flag == 1 include "$do_analysis_dir/mean_comparison.do"
discard
***************************** Summary Statistics *******************************
if $summarystats_flag == 1 include "$do_analysis_dir/summarystats.do"
**************************** Specification Charts ******************************
if $specification_chart_flag == 1 include "$do_analysis_dir/specification_charts.do"
******************************** Comprehension *********************************
if $comprehension_figure_flag == 1 include "$do_analysis_dir/comprehension.do"
******************************** Cortisol Levels *******************************
if $cortisol_flag == 1 include "$do_analysis_dir/cortisol.do"
********************************* Session Time *********************************
if $time_flag == 1 include "$do_analysis_dir/session_time.do"
